Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: build flag to append generated suffix to bundles #5814

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jcassidyav
Copy link
Contributor

PR Checklist

What is the current behavior?

See discussion: https://discord.com/channels/603595811204366337/1276116878154268763

It seems to be the case that sometimes when an iOS app is updating it does not overwrite the old js files with the new versions, resulting in app crashes etc.

What is the new behaviour?

This adds a new flag --unique-bundle which instructs the cli to generate an id, which is then passed to webpack to be appended as a suffix to generated bundle names.

The cli then uses this id to set the main entry in the package.json in the resulting app.

Note: In the discussion linked to above the files are generated with hashes, but then it becomes complicated to find the correct name of the main entry and I believe more brittle. An option would be to use something like the webpack-manifest-plugin to find the hashed value, or just assume a pattern but this seems a more straightforward solution.

There is a corresponding @nativescript/webpack PR #10614

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant